#include "widget.h"
#include "ui_widget.h"
#include <QPainter>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::paintEvent(QPaintEvent *event)
{
    (void) event;
    QPainter painter(this);
//    painter.drawLine(QPoint(10,10),QPoint(10,100));
    QPen pen(QColor(255,255,0));
    pen.setStyle(Qt::DashLine);
    pen.setWidth(3);
    painter.setPen(pen);
    painter.drawLine(20,100,100,100);
    painter.drawRect(200,200,200,200);
    painter.drawEllipse(100,100,200,100);
}

